from socket import *
print("Your computer: ",gethostname())
me=socket(AF_INET,SOCK_STREAM)
me.bind((gethostname(),12345))
me.listen(2)
ag,addr=me.accept()

a=[0,0]
cnt=0
while True:
    print("your point(s):",cnt)
    ag.send(str(-cnt).encode('ASCII'))
    a[0]=int(input())
    a[1]=int(ag.recv(10).decode('ASCII'))
    x=(a[0]-a[1]+3)%3
    if(x==1):
        print("win")
        ag.send("lose".encode('ASCII'))
        cnt+=1
    elif(x==2):
        print("lose")
        ag.send("win".encode('ASCII'))
        cnt-=1
    else:
        print("draw")
        ag.send("draw".encode('ASCII'))
